package com.test.drawing;

/**
 * Class that Holds the Information of a Soccer Player and his PlayerModel
 */
public class Player implements Touchable {

	/**
	 * Enum that defines the Teams of a Soccer Game
	 */
	public enum Team {
		First_Team, Second_Team;
	}

	// Model
	private PlayerModel model;

	// Player Information
	private Team team;
	private int number;
	private String position;


	/**
	 * Class' Constructor
	 * 
	 * @param model
	 *            Model to be Used by this Player
	 */
	public Player(PlayerModel model) {
		this.model = model;
	}

	/**
	 * Gets the Model of this Player
	 * 
	 * @return PlayerModel
	 */
	public PlayerModel getModel() {
		return model;
	}

	/**
	 * Sets the Player's Team
	 * 
	 * @param team
	 *            Player's Team
	 */
	public void setTeam(Team team) {
		this.team = team;
	}

	/**
	 * Gets the Player's Team
	 * 
	 * @return Player's Team
	 */
	public Team getTeam() {
		return team;
	}

	/**
	 * Set the Number of this Player
	 * 
	 * @param number
	 *            Number to be Used
	 */
	public void setNumber(int number) {
		this.number = number;
		model.setBoardNumber(number);
	}

	/**
	 * Gets the Number of this Player
	 * 
	 * @return int - Number of this Player
	 */
	public int getNumber() {
		return number;
	}
	
	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	@Override
	public boolean isTouched(float x, float y) {
		return model.isTouched(x, y);
	}
}
